package com.song.rbac.common;


import lombok.Data;

/**
 * @author Administrator
 */
@Data
public class Result<T> {
    // 状态码
    private Integer code;
    // 提示消息
    private String msg;
    // 接口返回内容
    private T data;

    public Result(T data, CodeStatus constants) {
        this.code = constants.getCode();
        this.msg = constants.getMsg();
        this.data = data;
    }

    public Result(CodeStatus constants) {
        this.code = constants.getCode();
        this.msg = constants.getMsg();
    }

    public Result(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Result(CodeStatus constants, String msg) {
        this.code = constants.getCode();
        this.msg = msg;
    }
}
